[IA64] Provides right frequency ratio and base for VTi domain
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Thu, 23 Feb 2006 22:40:18 +0000 (15:40 -0700)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Thu, 23 Feb 2006 22:40:18 +0000 (15:40 -0700)
This patch handles the pal_freq_ratio and pal_freq_base request breaked
to Xen by GFW for VTi domain.  and it fixed the wrong frequency ratio
and base  of VTi domian.  So,i with this patch, VTi domian can get the
right time ,itc,cpu frequency, freqency base and other kernel params rely
on right frequency_ratio.

Signed-off-by: Zhang xiantao <xiantao.zhang@intel.com>
Signed-off-by: Yu Ke <ke.yu@intel.com>
xen/arch/ia64/vmx/pal_emul.c

index 878df476c84c91b7d843f1b3d2558e463dc7404d..04e825b0fb982f3ac8c8b8401cc1af2b5c3e513b 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 #include <asm/vmx_vcpu.h>
+#include <asm/pal.h>
 
 static void
 get_pal_parameters (VCPU *vcpu, UINT64 *gr29,
@@ -180,10 +181,18 @@ pal_fixed_addr(VCPU *vcpu){
 
 static struct ia64_pal_retval
 pal_freq_base(VCPU *vcpu){
+    struct ia64_pal_retval result;
+
+    PAL_CALL(result,PAL_FREQ_BASE, 0, 0, 0);
+    return result;
 }
 
 static struct ia64_pal_retval
 pal_freq_ratios(VCPU *vcpu){
+    struct ia64_pal_retval result;
+
+    PAL_CALL(result,PAL_FREQ_RATIOS, 0, 0, 0);
+    return result;
 }
 
 static struct ia64_pal_retval
@@ -266,11 +275,19 @@ pal_emul( VCPU *vcpu) {
                case PAL_CACHE_WRITE:
                        result = pal_cache_write (vcpu);
                        break;
-                       
+
                case PAL_PLATFORM_ADDR:
                        result = pal_platform_addr (vcpu);
                        break;
 
+               case PAL_FREQ_RATIOS:
+                       result = pal_freq_ratios (vcpu);
+                       break;
+
+               case PAL_FREQ_BASE:
+                       result = pal_freq_base (vcpu);
+                       break;
+
                default:
                        panic("pal_emul(): guest call unsupported pal" );
   }